package com.laogao.enums;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200, "操作成功"),
    // 登录
    NEED_LOGIN(401, "需要登录后操作"),
    LOGIN_INVALID(402, "长时间未操作,请重新登录!"),
    NOT_FOUND(404, "未找到该资源!"),
    NO_OPERATOR_AUTH(403, "无权限操作"),
    SYSTEM_ERROR(500, "服务器正忙，请稍后再试!"),
    LOGIN_ERROR(501, "用户名或密码错误"),
    FILETYPE_ERROR(505, "文件类型错误"),
    PARTIAL_CONTENT(206, "文件部分上传");
    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage) {
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
    }
